<?php

/*
 * class to generate breadcrumbs for the runing page
 */

/**
 * Description of breadcrumb
 *
 * @author sadaf.siddiqui
 */
class breadcrumb extends CBehavior{
    
    

    public function createBreadcrumbs() {
        $path = explode("/", Yii::app()->request->getUrl());
//        unset($path[0]);// for live
        unset($path[0], $path[1],$path[2]);
        $breadcrumbs = array();
        $pageUrl = Yii::app()->baseUrl;

        foreach ($path as $page) {
            $breadcrumbs[ucwords(Helper::cleanString($page))] = ($pageUrl.="/" . $page);
        }
        return $breadcrumbs;
    }
}

?>
